package book_management.book;

public class Book {
    /**
     * 书本类
     * @author 胡伟龙
     * @date  2022年1月12日19:12:53
     */
    //书名
    private String bookName;
    //作者
    private String author;
    //书本价格
    private double price;
    //书本类
    private String type;
    //书本借阅状态
    private boolean isBorrowed;

    public Book(String bookName, String author, double price, String type) {
        this.bookName = bookName;
        this.author = author;
        this.price = price;
        this.type = type;
    }
    //可以修改的有，价格，书本类，和借阅状态

    public void setPrice(double price) {
        this.price = price;
    }

    public void setType(String type) {
        this.type = type;
    }

    public void setBorrowed(boolean borrowed) {
        isBorrowed = borrowed;
    }

    public String getBookName() {
        return bookName;
    }

    public String getAuthor() {
        return author;
    }

    public double getPrice() {
        return price;
    }

    public String getType() {
        return type;
    }

    public boolean isBorrowed() {
        return isBorrowed;
    }

    @Override
    public String toString() {
        return "Book{" +
                "bookName='" + bookName + '\'' +
                ", author='" + author + '\'' +
                ", price=" + price +
                ", type='" + type + '\'' +
                ", isBorrowed=" + isBorrowed +
                '}';
    }
}
